import java.io.FileReader;
import java.io.IOException;
import java.io.Reader;

/**
 * @author gao
 * @date 2025/8/11 16:24
 */

public class Demo3 {
    public static void main(String[] args) {
        try (Reader reader = new FileReader("./test.txt")) {
            while (true) {
                char[] chars = new char[1024];
                int c = reader.read(chars);
                if (c == -1) {
                    break;
                }
                for (int i = 0; i < c; i++) {
                    System.out.println(chars[i]);
                }
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}